import request from '@/utils/request'

// 查询项目售后列表
export function listSales(query) {
  return request({
    url: '/project/sales/list',
    method: 'get',
    params: query
  })
}

// 查询项目售后详细
export function getSales(afterSalesId) {
  return request({
    url: '/project/sales/' + afterSalesId,
    method: 'get'
  })
}

// 新增项目售后
export function addSales(data) {
  return request({
    url: '/project/sales',
    method: 'post',
    data: data
  })
}

// 修改项目售后
export function updateSales(data) {
  return request({
    url: '/project/sales',
    method: 'put',
    data: data
  })
}

// 删除项目售后
export function delSales(afterSalesId) {
  return request({
    url: '/project/sales/' + afterSalesId,
    method: 'delete'
  })
}

// 获取当前人员的组织机构名称
export function getOrgName() {
  return request({
    url: '/project/sales/getOrgUserName',
    method: 'get'
  })
}

//修改主分类
export function updateClass(data) {
  return request({
    url: '/project/sales/updateClass',
    method: 'put',
    data:data
  })
}
